Xbasic

SQL::SchemaListTables Method

Syntax

C ListTables(P Filter)

Table_List as C = .ListTables( [ IncludeTables as L [, IncludeViews as L [, IncludeSystemTables as L [, IncludeSynonyms as L [, IncludeAliases as L ]]]]] )

Arguments

Table_List

The retrieved list of tables.

SQL::Schema

A SQL::Schema object.

IncludeTables

Optional. Default = .T. (TRUE) = Include tables

IncludeViews

Optional. Default = .T. (TRUE) = Include views

IncludeSystemTables

Optional. Default = .T. (TRUE) = Include system tables

IncludeSynonyms

Optional. Default = .T. (TRUE) = Include synonyms

IncludeAliases

Optional. Default = .T. (TRUE) = Include aliases

Filter

Pointer

Description

The ListTables() method returns a list of tables in the current cache for the current database.

Example

dim conn as SQL::Connection
dim sch as SQL::Schema
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString)
   ui_msg_box("Error", conn.CallResult.text)
   end
end if
if .not. conn.GetSchema(sch) then
   ui_msg_box("Error", conn.CallResult.text)
   conn.close()
   end
end if
ui_msg_box("Tables", sch.ListTables())
conn.close()

See Also